package com.yx.front.controller;

import com.yx.front.annotation.AnonymousAccess;
import com.yx.front.config.global.CommonResult;
import com.yx.front.manager.FileTypeManager;
import com.yx.front.model.vo.FileTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 文件类型管理表 前端控制器
 * </p>
 *
 * @author YangXiong
 * @since 2023-03-25
 */
@Slf4j
@RestController
@RequestMapping("/file-type")
@Api(tags = "文件类型信息接口")
public class FileTypeController {
    @Resource
    private FileTypeManager fileTypeManager;

    @PostMapping("/type/page")
    @AnonymousAccess
    @ApiOperation("文件类型列表")
    public CommonResult<List<FileTypeVo>> getPage(){
        return fileTypeManager.getPage();
    }
}

